package com.sp.es.modal;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

/**
 * ES专用对象与BO对象类字段保持一致
 * @author haifeng
 *
 */
public class UniSubAccount implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -7988081689432208178L;
	
	//从账号标识
    @Field(type = FieldType.Long)
	private Long subAccountId;
	//副账号标识
    @Field(type = FieldType.Long)
    private Long deputyAccountId;
    //业务系统标识
    @Field(type = FieldType.Long)
    private Long businessSystemId;
    //业务系统编码
    @Field(type = FieldType.Keyword)
    private String businessSystemCode;
    //clientId
    @Field(type = FieldType.Keyword)
    private String clientId;
    //从账号名称
    @Field(type = FieldType.Keyword)
    private String subAccountName;
    //从账号
    @Field(type = FieldType.Keyword)
    private String subAccountNumber;
    //账号状态
    @Field(type = FieldType.Keyword)
    private String accountStatus;
    //是否同步
    @Field(type = FieldType.Keyword)
    private String isSync;
    //来源系统
    @Field(type = FieldType.Keyword)
    private String originalSystem;
    //外部从账号标识
    @Field(type = FieldType.Keyword)
    private String originalSubAccountId;
    //生效日期
    @Field(type= FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date validDate;
    //失效日期
    @Field(type= FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date expireDate;
    //数据状态
    @Field(type = FieldType.Keyword)
    private String dataStatus;
    //创建日期
    @Field(type= FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createDate;
    //创建操作员编码
    @Field(type = FieldType.Keyword)
    private String createOpId;
    //创建组织编码
    @Field(type = FieldType.Keyword)
    private String createOrgId;
    //事务编号
    @Field(type = FieldType.Keyword)
    private Long doneCode;
    //操作日期
    @Field(type= FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date doneDate;
    //操作员编码
    @Field(type = FieldType.Keyword)
    private String opId;
    //操作组织编码
    @Field(type = FieldType.Keyword)
    private String orgId;
    //数据归属地区
    @Field(type = FieldType.Keyword)
    private String regionId;
    //员工工号
    @Field(type = FieldType.Keyword)
    private String staffCode;
    //角色列表
    @Field(type = FieldType.Nested)
    private Set<UniRoleAuth> uniRoles;

	public Long getSubAccountId() {
		return subAccountId;
	}

	public void setSubAccountId(Long subAccountId) {
		this.subAccountId = subAccountId;
	}

	public Long getDeputyAccountId() {
		return deputyAccountId;
	}

	public void setDeputyAccountId(Long deputyAccountId) {
		this.deputyAccountId = deputyAccountId;
	}

	public Long getBusinessSystemId() {
		return businessSystemId;
	}

	public void setBusinessSystemId(Long businessSystemId) {
		this.businessSystemId = businessSystemId;
	}

	public String getBusinessSystemCode() {
		return businessSystemCode;
	}

	public void setBusinessSystemCode(String businessSystemCode) {
		this.businessSystemCode = businessSystemCode;
	}

	public String getClientId() {
		return clientId;
	}

	public void setClientId(String clientId) {
		this.clientId = clientId;
	}

	public String getSubAccountName() {
		return subAccountName;
	}

	public void setSubAccountName(String subAccountName) {
		this.subAccountName = subAccountName;
	}

	public String getSubAccountNumber() {
		return subAccountNumber;
	}

	public void setSubAccountNumber(String subAccountNumber) {
		this.subAccountNumber = subAccountNumber;
	}

	public String getAccountStatus() {
		return accountStatus;
	}

	public void setAccountStatus(String accountStatus) {
		this.accountStatus = accountStatus;
	}

	public String getIsSync() {
		return isSync;
	}

	public void setIsSync(String isSync) {
		this.isSync = isSync;
	}

	public String getOriginalSystem() {
		return originalSystem;
	}

	public void setOriginalSystem(String originalSystem) {
		this.originalSystem = originalSystem;
	}

	public String getOriginalSubAccountId() {
		return originalSubAccountId;
	}

	public void setOriginalSubAccountId(String originalSubAccountId) {
		this.originalSubAccountId = originalSubAccountId;
	}

	public Date getValidDate() {
		return validDate;
	}

	public void setValidDate(Date validDate) {
		this.validDate = validDate;
	}

	public Date getExpireDate() {
		return expireDate;
	}

	public void setExpireDate(Date expireDate) {
		this.expireDate = expireDate;
	}

	public String getDataStatus() {
		return dataStatus;
	}

	public void setDataStatus(String dataStatus) {
		this.dataStatus = dataStatus;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getCreateOpId() {
		return createOpId;
	}

	public void setCreateOpId(String createOpId) {
		this.createOpId = createOpId;
	}

	public String getCreateOrgId() {
		return createOrgId;
	}

	public void setCreateOrgId(String createOrgId) {
		this.createOrgId = createOrgId;
	}

	public Long getDoneCode() {
		return doneCode;
	}

	public void setDoneCode(Long doneCode) {
		this.doneCode = doneCode;
	}

	public Date getDoneDate() {
		return doneDate;
	}

	public void setDoneDate(Date doneDate) {
		this.doneDate = doneDate;
	}

	public String getOpId() {
		return opId;
	}

	public void setOpId(String opId) {
		this.opId = opId;
	}

	public String getOrgId() {
		return orgId;
	}

	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

	public String getRegionId() {
		return regionId;
	}

	public void setRegionId(String regionId) {
		this.regionId = regionId;
	}

	public String getStaffCode() {
		return staffCode;
	}

	public void setStaffCode(String staffCode) {
		this.staffCode = staffCode;
	}

	public Set<UniRoleAuth> getUniRoles() {
		return uniRoles;
	}

	public void setUniRoles(Set<UniRoleAuth> uniRoles) {
		this.uniRoles = uniRoles;
	}

    

}
